{extend name="base" /}

{block name="title"}在线留言{/block}

{block name="main"}
	<!-- Content Wrapper. Contains page content -->
	<div class="content-wrapper">
		<!-- Content Header (Page header) -->
		<section class="content-header">
			<h1>在线留言 <small>王者荣耀</small></h1>
			<ol class="breadcrumb">
				<li><a href="/shuashuale"><i class="fa fa-home"></i> 首页</a></li>
				<li><a href="/shuashuale/message"> 交流中心</a></li>
				<li class="active">在线留言</li>
			</ol>
		</section>

		<!-- Main content -->
		<section class="content container-fluid">
			<div class="box">
				<div class="box-header with-border">
					<h3 class="box-title">在线留言</h3>
				</div>
				<!-- /.box-header -->
				<div class="box-body table-responsive no-padding">
					<table class="table table-bordered">
						<tr>
							<th>编号</th>
							<th>标题</th>
							<th>用户</th>
							<th>发布时间</th>
							<th>是否已回复</th>
							<th>操作</th>
						</tr>
						{volist name='messages' id='message'}
						<tr>
							<td>{$message.message_id}</td>
							<td>{$message.title}</td>
							<td>{$message.username}</td>
							<td>{$message.create_time}</td>
							<td>
								{eq name="message.reply_time" value="0"}
								<small style="color:red">未回复</small>
								{else/}
								<small style="color:blue">已回复</small>
								{/eq}
							</td>
							<td>
								<a class="btn btn-primary btn-xs btn-flat" href="/shuashuale/message/update?message_id={$message.message_id}">回复</a>
								<a class="btn btn-danger btn-xs btn-flat" href="/shuashuale/message/delete?message_id={$message.message_id}">删除</a>
							</td>
						</tr>
						{/volist}
					</table>
				</div>
				<!-- /.box-body -->
				<div class="box-footer clearfix">
					{$messages->render()}
				</div>
			</div>
		</section>
		<!-- /.content -->
	</div>
	<!-- /.content-wrapper -->
{/block}